package com.example.mvp.mvppromote.presenter;

import com.example.mvp.mvppromote.base.BasePresenter;
import com.example.mvp.mvppromote.ui.iview.ILineView;

import java.util.ArrayList;

/**
 * Created by wutongyu on 16/7/9.
 */
public class LineViewPresenter extends BasePresenter<ILineView>{
    private ILineView iLineView;
    public LineViewPresenter(ILineView view) {
        super(view);
        this.iLineView=view;
    }
    public void loadLineView(){
        ArrayList<Integer> dataList = new ArrayList<Integer>();
        int random = (int)(Math.random()*9+1);
        for (int i=0; i<20; i++){
            dataList.add((int)(Math.random()*random));
        }

        ArrayList<ArrayList<Integer>> dataLists = new ArrayList<ArrayList<Integer>>();
        dataLists.add(dataList);
        iLineView.loadLineView(dataLists);
    }

}
